import Vapor
import Fluent

final class EmployeeLanguagePivot: Model, Content {
    
    static let schema: String = "employee-language-pivot"
    
    @ID
    var id: UUID?
    
    @Parent(key: "employeeID")
    var employee: Employee
    
    @Parent(key: "languageID")
    var language: Language

 
    init() {
        
    }
    
    init(id: UUID? = nil, employee: Employee, language: Language) throws {
      self.id = id
      self.$employee.id = try employee.requireID()
      self.$language.id = try language.requireID()
    }
    
    
}
